fix(remote-input): 开关已开时启动也要拉起局域网服务 - #1002
Open
zhou-zhichao wants to merge 2 commits into
Open
Conversation
Toggling the setting only refreshed the server on a prefs change. After restart the switch stayed on but port 8443 never bound, so the phone page could not open.
On Windows, NIC enumeration and Tauri path APIs from the async runtime can stall the LAN server, and set_remote_locale's main-thread tray refresh deadlocks the settings page. Start the server on Ready and keep those calls off the UI thread.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
refresh_remote_server。启动时即使remoteInputEnabled已是 true,8443 也不会监听。RunEvent::Ready再 refresh,避免 Windows 上 setup 阶段的异步任务还没跑起来就被丢掉。spawn_blocking,局域网 IP 用 UDP 路由探测,不再走list_afinet_netifas。set_remote_locale;这里再run_on_main_thread刷托盘会和 WebView 互相等,窗口变成「未响应」。语言同步只改 locale,不再刷托盘。Test plan